use strict;
use warnings;

use Test::More tests => 1;

use HTML::FormFu;

my $form = HTML::FormFu->new->auto_id("%n");

$form->element('Dojo::Editor2')->name('ed');

my $xhtml = <<EOF;
<form action="" method="post">
<span class="textarea dojoeditor2">
<textarea name="ed" cols="40" id="ed" rows="20"></textarea>
</span>
<script type="text/javascript">
dojo.require("dojo.widget.Editor2");
dojo.widget.createWidget(
    "Editor2",
    {},
    dojo.byId("ed")
);

</script>
</form>
EOF

is( "$form", $xhtml );
